package com.junzerg.tooltip.controller;

/**
 * @author pengjz <br>
 * @version 1.0 <br>
 * @description TranslateController <br>
 * @date 2022/4/6 22:23 <br>
 */

import com.alibaba.fastjson.JSONObject;
import com.junzerg.tooltip.controller.request.TranslateRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping(value = "/translate")
@Slf4j
@ResponseBody
public class TranslateController extends BaseController {


    @PostMapping("/")
    public Object getTranslate(
            @RequestBody TranslateRequest request
    ) {
        log.info("[getTranslate] request: {}", JSONObject.toJSONString(request));
        return success(request.getQ());
    }

}
